package org.dydl.common.hibernate.naming.strategy;

import org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy;
import org.springframework.stereotype.Component;

/**
 * HIBERNATE 数据库字段命名规则
 * 
 * @Description:
 * @author DWL
 * @date 2017年4月13日 上午8:29:52
 * @version V1.0
 */
@Component("namingStrategy")
public class HibernateNamingStrategy extends SpringNamingStrategy {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4664259210478842334L;

	@Override
	public String propertyToColumnName(String propertyName) {
		return addUnderscores(propertyName).toUpperCase();
	}

	@Override
	public String columnName(String columnName) {
		return super.columnName(columnName);
	}

}
